Skip to content

feat(node): Update Vercel AI span attributes #16580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

AbhiPrasad
Copy link
Member

resolve #16572

@AbhiPrasad AbhiPrasad requested a review from a team June 13, 2025 21:01
@AbhiPrasad AbhiPrasad self-assigned this Jun 13, 2025
@AbhiPrasad AbhiPrasad requested review from Lms24 and chargome and removed request for a team June 13, 2025 21:01
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.99 kB - -
@sentry/browser - with treeshaking flags 23.76 kB - -
@sentry/browser (incl. Tracing) 38.79 kB - -
@sentry/browser (incl. Tracing, Replay) 76.89 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.97 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 81.65 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 93.72 kB - -
@sentry/browser (incl. Feedback) 40.73 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 40.78 kB - -
@sentry/vue 28.36 kB - -
@sentry/vue (incl. Tracing) 40.66 kB - -
@sentry/svelte 24.01 kB - -
CDN Bundle 25.48 kB - -
CDN Bundle (incl. Tracing) 38.96 kB - -
CDN Bundle (incl. Tracing, Replay) 74.78 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.2 kB - -
CDN Bundle - uncompressed 74.48 kB - -
CDN Bundle (incl. Tracing) - uncompressed 115.3 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 229.27 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 242.09 kB - -
@sentry/nextjs (client) 42.44 kB - -
@sentry/sveltekit (client) 39.28 kB - -
@sentry/node 150.65 kB +0.07% +94 B 🔺
@sentry/node - without tracing 98.4 kB +0.01% +1 B 🔺
@sentry/aws-serverless 124.15 kB - -

View base workflow run

attributes['gen_ai.response.tool_calls'] = attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];
delete attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];
}
if (attributes[AI_PROMPT_TOOLS_ATTRIBUTE] != undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: this is fine, but maybe we could even add a utility to make this easier to grok, e.g.:

function renameAttributeKey(attributes: SpanAttributes, oldKey: string, newKey: string) {
  if (attributes[oldKey] != null) {
    attributes[newKey] = attributes[oldKey];
    delete attributes[oldKey];
  }
}

// and then
renameAttributeKey(AI_RESPONSE_TEXT_ATTRIBUTE, 'gen_ai.response.text');
// etc...

@AbhiPrasad AbhiPrasad merged commit a26bdaf into develop Jun 16, 2025
149 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-vercel-ai-attributes branch June 16, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update vercel ai integration for newly aligned attributes
2 participants